import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
// https://vite.dev/config/
export default defineConfig({
  plugins: [vue()],
  resolve: { //vite 配置路径别名
    alias: {
      '@': path.resolve(__dirname, 'src')
    }
  },
  server: { //配置代理
    proxy: {
      "/api": {
        target: "http://8.137.35.74:8080",
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, '')
      }
    }
  }
})
